package com.wxproj.wxai.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import java.util.Date;

@TableName
@Data
public class UserInfo {
    @NotEmpty
    @TableId(value = "id",type = IdType.INPUT)
    private String id;
    @NotEmpty
    private String openid;
    private String nickname;
    private String avaterUrl;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    private Date registerTime;

    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    private Date lastloginTime;

    @TableField(exist = false,select = false)
    private String code;
}
